<?php
// $config['root_dir'] = dirname(__FILE__);

$routes = array(
  // /files is a special case with subdomains. cf. index.php
  'files/([^/]+)/(\d+x\d+)\.([^/]+)' => array(
    'controller' => 'files', 'action' => 'resize',
  ),
  '([^/]+)/cv/show_slot/([^/]+)/(\d+)' => array(
    'controller' => 'cv', 'action' => 'show_slot',
  ),
  '([^/]+)/cv/add/([^/]+)' => array(
    'controller' => 'cv', 'action' => 'add',
  ),
  '([^/]+)/cv/harp/([^/]+)' => array(
    'controller' => 'cv', 'action' => 'harp',
  ),
  '([^/]+)/cv/save' => array(
      'controller' => 'cv', 'action' => 'save',
  ),
  '([^/]+)/cv/upload/foto' => array(
      'controller' => 'cv', 'action' => 'upload',
  ),
  '([^/]+)/cv/login' => array(
      'controller' => 'cv', 'action' => 'login',
  ),
  '([^/]+)/cv/login/([^/]+)' => array(
      'controller' => 'cv', 'action' => 'login',
  ),
  '([^/]+)/cv/logout' => array(
      'controller' => 'cv', 'action' => 'logout',
  ),
  '([^/]+)/cv/password' => array(
      'controller' => 'cv', 'action' => 'password',
  ),
  '([^/]+)/cv/register' => array(
      'controller' => 'cv', 'action' => 'register',
  ),
  '([^/]+)/slot/save' => array(
      'controller' => 'slot', 'action' => 'save',
  ),
  '([^/]+)/slot/(del|up|down)/(\d+)' => array(
    'controller' => 'slot', 'action' => 'op',
    'args' => array('cv', NULL, 'slot'),
  ),
  '([^/]+)/slot' => array(
    'controller' => 'slot', 'action' => 'index'
  ),
  '([^/]+)/pw' => array(
      'controller' => 'cv', 'action' => 'pw_auth',
      'args' => array('cv'),
  ),
  '([^/]+)/nopw' => array(
      'controller' => 'cv', 'action' => 'pw_unauth',
      'args' => array('cv'),
  ),
  '([^/]+)/kontakt' => array(
      'controller' => 'cv', 'action' => 'contact',
      'args' => array('cv'),
  ),
  '([^/]+)/track/pixel' => array(
      'controller' => 'track', 'action' => 'pixel',
  ),
  'anmelden' => array(
    'controller' => 'home', 'action' => 'register_page'
  ),
  '([^/]+)' => array(
    'controller' => 'cv', 'action' => 'index',
    'args' => array('cv'),
  ),
  '' => array(
    'controller' => 'home', 'action' => 'index', /*'auth' => 'user'*/
  ),
);
